<?php  
header("content-type:text/html;charset=utf-8");
$link=mysql_connect("localhost","root","root");  
mysql_select_db("pro", $link);  
$q = "SELECT * FROM type";  
mysql_query("SET NAMES 'utf8'");  
$rs = mysql_query($q, $link);   

echo "<table>";  
echo "<tr><td>ID</td><td>姓名</td></tr>";  
while($row = mysql_fetch_object($rs)) echo "<tr><td><a href='d1.php?id=$row->id'>删除</a></td><td>$row->naming</td></tr>";  
echo "</table>";  
?> 

